/*    */ package com.zimbra.cs.index.query.parser;
/*    */ 
/*    */ import java.io.PrintStream;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ class SimpleNode
/*    */   implements Node
/*    */ {
/*    */   protected Node parent;
/*    */   protected Node[] children;
/*    */   protected int id;
/*    */   protected Object value;
/*    */   protected Parser parser;
/*    */   protected Token firstToken;
/*    */   protected Token lastToken;
/*    */   
/*    */   public SimpleNode(int i)
/*    */   {
/* 32 */     this.id = i;
/*    */   }
/*    */   
/*    */   public SimpleNode(Parser p, int i) {
/* 36 */     this(i);
/* 37 */     this.parser = p;
/*    */   }
/*    */   
/*    */ 
/*    */   public void jjtOpen() {}
/*    */   
/*    */ 
/*    */   public void jjtClose() {}
/*    */   
/* 46 */   public void jjtSetParent(Node n) { this.parent = n; }
/* 47 */   public Node jjtGetParent() { return this.parent; }
/*    */   
/*    */   public void jjtAddChild(Node n, int i) {
/* 50 */     if (this.children == null) {
/* 51 */       this.children = new Node[i + 1];
/* 52 */     } else if (i >= this.children.length) {
/* 53 */       Node[] c = new Node[i + 1];
/* 54 */       System.arraycopy(this.children, 0, c, 0, this.children.length);
/* 55 */       this.children = c;
/*    */     }
/* 57 */     this.children[i] = n;
/*    */   }
/*    */   
/*    */   public Node jjtGetChild(int i) {
/* 61 */     return this.children[i];
/*    */   }
/*    */   
/*    */   public int jjtGetNumChildren() {
/* 65 */     return this.children == null ? 0 : this.children.length;
/*    */   }
/*    */   
/* 68 */   public void jjtSetValue(Object value) { this.value = value; }
/* 69 */   public Object jjtGetValue() { return this.value; }
/*    */   
/* 71 */   public Token jjtGetFirstToken() { return this.firstToken; }
/* 72 */   public void jjtSetFirstToken(Token token) { this.firstToken = token; }
/* 73 */   public Token jjtGetLastToken() { return this.lastToken; }
/* 74 */   public void jjtSetLastToken(Token token) { this.lastToken = token; }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/* 82 */   public String toString() { return ParserTreeConstants.jjtNodeName[this.id]; }
/* 83 */   public String toString(String prefix) { return prefix + toString(); }
/*    */   
/*    */ 
/*    */ 
/*    */   public void dump(String prefix)
/*    */   {
/* 89 */     System.out.println(toString(prefix));
/* 90 */     if (this.children != null) {
/* 91 */       for (int i = 0; i < this.children.length; i++) {
/* 92 */         SimpleNode n = (SimpleNode)this.children[i];
/* 93 */         if (n != null) {
/* 94 */           n.dump(prefix + " ");
/*    */         }
/*    */       }
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/index/query/parser/SimpleNode.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */